package com.lm.spi.example;

import com.lm.spi.inter.GreetingService;

import java.util.ServiceLoader;

public class SpiExample {
    public static void main(String[] args) {
        ServiceLoader<GreetingService> services = ServiceLoader.load(GreetingService.class);
        for (GreetingService service : services) {
            service.sayHello("Java Developer");
        }
    }
}
